<?php
$this->breadcrumbs=array(
	'Cat Services'=>array('index'),
	$model->name,
);

$this->menu=array(
	array('label'=>'List CatService','url'=>array('index')),
	array('label'=>'Create CatService','url'=>array('create')),
	array('label'=>'Update CatService','url'=>array('update','id'=>$model->id)),
	array('label'=>'Delete CatService','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage CatService','url'=>array('admin')),
);
?>

<h1>View CatService #<?php echo $model->id; ?></h1>

<?php $this->widget('bootstrap.widgets.TbDetailView',array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'uk',
		'name',
		'name_en',
		'parent_id',
		'created_time',
		'enable',
	),
)); ?>



<div class="row-fluid">
<div class="span8">
<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'type'=>'striped',
	'id'=>'children-catservice-grid',
	'dataProvider'=>new CArrayDataProvider($model->children),
	#'filter'=>$model,
	'hideHeader'=>true,
	'columns'=>array(
		array(
			'name'=>'id',
			'value'=>'$data->id',
			'htmlOptions'=>array('style'=>'width:30px'),
		),
		array(
			'name'=>'name',
			'type'=>'raw',
			'value'=>'CHtml::link($data->name, array("/hq/catService/view/","id"=>$data->id))'
		),
		array(
			'name'=>'index',
			'value'=>'$data->index',
			'htmlOptions'=>array('style'=>'width:30px'),
		),

		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'htmlOptions'=>array(
			'style'=>'width:100px;;text-align:right;',
			),

			'buttons'=>array(
					'up'=>array(
					'label'=>'Move Up',
					'icon'=>'icon-arrow-up',
					'url'=>'"#".$data->id',
					'htmlOptions'=>array(
						'entryId'=>''
					),
					'click'=>'function(e) {
						e.preventDefault();
						var id = $(this).attr("href");
						id = id.substr(1);
						$.post("'.$this->createUrl('moveUp').'", {id:id}, function(data, txtStatus) {
						$.fn.yiiGridView.update("children-catservice-grid");
					});
					return false;
					}',
				),
			'down'=>array(
			'label'=>'Move Down',
					'icon'=>'icon-arrow-down',
					'url'=>'"#".$data->id',
					'htmlOptions'=>array(
					'entryId'=>''
			),
			'click'=>'function(e) {
						e.preventDefault();
						var id = $(this).attr("href");
						id = id.substr(1);
						$.post("'.$this->createUrl('moveDown').'", {id:id}, function(data, txtStatus) {
						$.fn.yiiGridView.update("children-catservice-grid");
					});
			return false;
			}',
			),
			),

			'template'=>'{up}{down}|{view}{update}{delete}',
		),
	),
)); ?>
</div>
</div>